package com.zmn.mcc.common.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 数据权限
 * @author heguanghua
 * @since 2020/05/24 15:53
 */
public class DpermitConsts {

    /**
     * 数据权限类型
     * 指定系统的数据权限类型值为1000以上
     */
    public static final int TYPE_ORGANIZE                   = 100;      // [基础类型]组织架构，平台/大区/子公司/服务商
    public static final int TYPE_ORGANIZE_PLAT              = 101;      // 平台
    public static final int TYPE_ORGANIZE_REGION            = 102;      // 大区
    public static final int TYPE_ORGANIZE_SUB               = 103;      // 子公司
    public static final int TYPE_ORGANIZE_SP                = 104;      // 服务商

    public static final int TYPE_DEPT                       = 200;      // [基础类型]部门
    public static final int TYPE_DEPT_L1                    = 201;      // 一级部门
    public static final int TYPE_DEPT_L2                    = 202;      // 二级部门
    public static final int TYPE_DEPT_L3                    = 203;      // 三级部门

    public static final int TYPE_AREA                       = 300;      // [基础类型]区域，省、市、区县
    public static final int TYPE_AREA_PROVINCE              = 301;      // 省
    public static final int TYPE_AREA_CITY                  = 302;      // 市
    public static final int TYPE_AREA_COUNTY                = 303;      // 区县

    /**
     * 合作权限
     */
    public static final int TYPE_COOPERATION                = 400;      // [基础类型]合作，下单平台/一级合作/二级合作
    public static final int TYPE_COOPERATION_PLAT           = 401;      // 下单平台
    public static final int TYPE_COOPERATION_ONE = 402;      // 一级合作
    public static final int TYPE_COOPERATION_TWO = 403;      // 二级合作

//    public static final int TYPE_CATEGORY                 = 500;      // [基础类型]分类，服务分类/一级产品分类/一级产品分类
//    public static final int TYPE_CATEGORY_SEVR            = 501;      // 服务分类
//    public static final int TYPE_CATEGORY_PROD1           = 502;      // 一级产品分类
//    public static final int TYPE_CATEGORY_PROD2           = 503;      // 一级产品分类

    public static final int TYPE_CUBE                       = 1000;     // [基础类型]大数据报表(菜单)
    public static final int TYPE_CUBE_L1                    = 1001;     // 一级
    public static final int TYPE_CUBE_L2                    = 1002;     // 二级
    public static final int TYPE_CUBE_L3                    = 1003;     // 三级
    public static final int TYPE_CUBE_L4                    = 1004;     // 四级

    public static final int TYPE_MEASURE                    = 2000;     // [基础类型]大数据指标
    public static final int TYPE_MEASURE_L1                 = 2001;     // 一级
    public static final int TYPE_MEASURE_L2                 = 2002;     // 二级
    public static final int TYPE_MEASURE_L3                 = 2003;     // 三级

    public static final int TYPE_PRODUCT                    = 500;      // [基础类型]产品，业务类型/业务线/产品组
    public static final int TYPE_PRODUCT_BIZTYPE            = 501;      // 业务类型
    public static final int TYPE_PRODUCT_BIZLINE            = 502;      // 业务线
    public static final int TYPE_PRODUCT_PRODUCTGROUP       = 503;      // 产品组

    public static final int TYPE_PROMOTION = 600;     // [基础类型]推广权限
    public static final int TYPE_PROMOTION_ONE = 601;     // 二级合作(一级)
    public static final int TYPE_PROMOTION_TWO = 602;     // 营销一级账户(二级)
    public static final int TYPE_PROMOTION_THR = 603;     // 营销二级账户(三级)

    public static final int TYPE_CHANNEL = 700;     // [基础类型]渠道权限
    public static final int TYPE_CHANNEL_ONE = 701;     // 一级渠道
    public static final int TYPE_CHANNEL_TWO = 702;     // 二级渠道
    public static final int TYPE_CHANNEL_THR = 703;     // 三级渠道

    /**
     * 指标层级
     */
    public static final int MEASURE_LEVEL_DATASET           = 1;    // 数据集
    public static final int MEASURE_LEVEL_CATEGORY          = 2;    // 指标分类
    public static final int MEASURE_LEVEL_MEASURE           = 3;    // 指标
    public static final List<Integer> MEASURE_LEVEL_ALL = Arrays.asList(MEASURE_LEVEL_DATASET, MEASURE_LEVEL_CATEGORY, MEASURE_LEVEL_MEASURE);

    /**
     * 大数据菜单层级
     */
    public static final int CUBE_LEVEL_ONE                  = 1;    // 一级
    public static final int CUBE_LEVEL_TWO                  = 2;    // 二级
    public static final int CUBE_LEVEL_THRE                 = 3;    // 三级
    public static final int CUBE_LEVEL_FOUR                 = 4;    // 四级
    public static final List<Integer> CUBE_LEVEL_ALL = Arrays.asList(CUBE_LEVEL_ONE, CUBE_LEVEL_TWO, CUBE_LEVEL_THRE, CUBE_LEVEL_FOUR);

    /**
     * 全部基础类型
     */
    //public static final List<Short> TYPE_ALL              = Arrays.asList(TYPE_ORGANIZE, TYPE_DEPT, TYPE_AREA,
    // TYPE_CHANNEL, TYPE_CATEGORY, TYPE_CUBE);
    public static final List<Integer> TYPE_ALL = Arrays.asList(TYPE_ORGANIZE, TYPE_DEPT, TYPE_AREA,
            TYPE_COOPERATION, TYPE_CUBE, TYPE_PRODUCT, TYPE_MEASURE, TYPE_PROMOTION, TYPE_CHANNEL);


    /**
     * 组织等级
     */
    public static final int ORGANIZE_LEVEL_PLAT             = 1;    // 平台公司
    public static final int ORGANIZE_LEVEL_REGION           = 2;    // 大区
    public static final int ORGANIZE_LEVEL_SUB              = 3;    // 子公司
    public static final int ORGANIZE_LEVEL_GRANDSON         = 4;    // 孙公司，信息公司/电器公司/服务商
    public static final List<Integer> ORGANIZE_LEVEL_PLAT_REGION_SUB
            = Arrays.asList(ORGANIZE_LEVEL_PLAT, ORGANIZE_LEVEL_REGION, ORGANIZE_LEVEL_SUB);
    /**
     * 部门等级
     */
    public static final int DEPT_LEVEL_ONE                  = 1;    // 一级部门
    public static final int DEPT_LEVEL_TWO                  = 2;    // 二级部门
    public static final int DEPT_LEVEL_THRE                 = 3;    // 三级部门
    public static final int DEPT_LEVEL_FOUR                 = 4;    // 四级部门
    public static final List<Integer> DEPT_LEVEL_ALL
            = Arrays.asList(DEPT_LEVEL_ONE, DEPT_LEVEL_TWO, DEPT_LEVEL_THRE, DEPT_LEVEL_FOUR);
    /**
     * 区域等级
     */
    public static final int AREA_LEVEL_PROVINCE             = 2;    // 省份
    public static final int AREA_LEVEL_CITY                 = 3;    // 城市
    public static final int AREA_LEVEL_COUNTY               = 4;    // 区县
    public static final List<Integer> AREA_LEVEL_ALL
            = Arrays.asList(AREA_LEVEL_PROVINCE, AREA_LEVEL_CITY, AREA_LEVEL_COUNTY);
    /**
     * 合作
     */
    public static final int COOPERATION_LEVEL_PLAT = 1;    // 下单平台
    public static final int COOPERATION_LEVEL_COMPANY = 2;    // 一级合作
    public static final int COOPERATION_LEVEL_CHANNEL = 3;    // 二级合作
    public static final List<Integer> COOPERATION_LEVEL_ONE_TOW = Arrays.asList(COOPERATION_LEVEL_COMPANY, COOPERATION_LEVEL_CHANNEL);



    /**
     * 业务线
     */
    public static final int PRODUCT_LEVEL_BIZTYPE             = 1;    // 业务类型
    public static final int PRODUCT_LEVEL_BIZLINE             = 2;    // 业务线
    public static final int PRODUCT_LEVEL_PRODUCTGROUP        = 3;    // 产品组
    public static final List<Integer> PRODUCT_LEVEL_ALL
            = Arrays.asList(PRODUCT_LEVEL_BIZTYPE, PRODUCT_LEVEL_BIZLINE, PRODUCT_LEVEL_PRODUCTGROUP);

    /**
     * 描述: 推广权限等级
     */
    public static final int PROMOTION_LEVEL_ONE = 1;     // 二级级合作(二级)
    public static final int PROMOTION_LEVEL_TWO = 2;     // 营销一级账户(一级)
    public static final int PROMOTION_LEVEL_THR = 3;     // 营销二级账户(二级)
    public static final List<Integer> ACCOUNT_LEVEL_ALL
            = Arrays.asList(PROMOTION_LEVEL_ONE, PROMOTION_LEVEL_TWO, PROMOTION_LEVEL_THR);


    /**
     * 描述: 渠道权限（以前的渠道权限叫合作权限了）
     */
    public static final int CHANNEL_LEVEL_ONE = 1;     // 一级渠道
    public static final int CHANNEL_LEVEL_TWO = 2;     // 二级渠道
    public static final int CHANNEL_LEVEL_THR = 3;     // 三级渠道
    public static final List<Integer> CHANNEL_LEVEL_ALL
            = Arrays.asList(CHANNEL_LEVEL_ONE, CHANNEL_LEVEL_TWO, CHANNEL_LEVEL_THR);
}
